﻿
using System;
using System.Data;
using System.Data.SqlClient;
namespace Model
{
	
	/// <summary>	 
	/// 管理用户表
	/// </summary>
	public class DbManager
	{ 
		#region DbManager
		/// <summary>
		/// 
		/// </summary>
		public DbManager()
		{
		}
		/// <summary>	 
		/// 
		/// </summary>
		public DbManager(Int32 mId)
		{
			this.mId = mId;
		
		}
		/// <summary>	 
		/// 
		/// </summary>		
		public DbManager(DataRow dr)
		{
			int.TryParse(Convert.ToString(dr["mId"]),out mId);
			this.mUser = Convert.ToString(dr["mUser"]);
			this.mPwd = Convert.ToString(dr["mPwd"]);
			this.mLastIP = Convert.ToString(dr["mLastIP"]);
			this.mLastDate = Convert.ToString(dr["mLastDate"]);
			int.TryParse(Convert.ToString(dr["mRoleCode"]),out mRoleCode);
			this.mStatus = Convert.ToInt16(dr["mStatus"]);
			int.TryParse(Convert.ToString(dr["mLoginTimes"]),out mLoginTimes);
			
		}
		#endregion
		
		
		#region MId
		private Int32 mId;
		/// <summary>	 
		/// 
		/// AutoInc
		/// PK
		/// </summary>
		public Int32 MId
		{
			get{ return mId; }
			set{ mId= value; }
		}
		#endregion
		
		#region MUser
		private System.String mUser;
		/// <summary>	 
		/// 登录名
		/// </summary>
		public System.String MUser
		{
			get{ return mUser; }
			set{ mUser= value; }
		}
		#endregion
		
		#region MPwd
		private System.String mPwd;
		/// <summary>	 
		/// 登录密码
		/// </summary>
		public System.String MPwd
		{
			get{ return mPwd; }
			set{ mPwd= value; }
		}
		#endregion
		
		#region MLastIP
		private System.String mLastIP;
		/// <summary>	 
		/// 最后到访IP
		/// </summary>
		public System.String MLastIP
		{
			get{ return mLastIP; }
			set{ mLastIP= value; }
		}
		#endregion
		
		#region MLastDate
		private System.String mLastDate;
		/// <summary>	 
		/// 最后到访日期
		/// </summary>
		public System.String MLastDate
		{
			get{ return mLastDate; }
			set{ mLastDate= value; }
		}
		#endregion
		
		#region MRoleCode
		private Int32 mRoleCode;
		/// <summary>	 
		/// 所属角色
		/// </summary>
		public Int32 MRoleCode
		{
			get{ return mRoleCode; }
			set{ mRoleCode= value; }
		}
		#endregion
		
		#region MStatus
		private Int16 mStatus;
		/// <summary>	 
		/// 状态
		/// 1-正常 0-锁定
		/// </summary>
		public Int16 MStatus
		{
			get{ return mStatus; }
			set{ mStatus= value; }
		}
		#endregion
		
		#region MLoginTimes
		private Int32 mLoginTimes;
		/// <summary>	 
		/// 登录次数
		/// </summary>
		public Int32 MLoginTimes
		{
			get{ return mLoginTimes; }
			set{ mLoginTimes= value; }
		}
		#endregion

	}
}
